package service;

import org.springframework.stereotype.Service;

/**
 * @author 石小俊
 */
@Service
public class UserServiceImpl implements UserService{
    @Override
    public String login(String username, String password) throws UserNotExistException {
        System.out.println("UserServiceImpl.login");
        if("admin".equals(username) && "123456".equals(password)){
            return "success";
        }
        throw new UserNotExistException("用户名或密码错误");
    }

    @Override
    public void register(String username, String password, String phone, String address) {
        System.out.println("UserServiceImpl.register");
    }
}
